package com.alan.shiro.api.token.manager.impl;

import com.alan.shiro.api.token.StatelessToken;
import com.alan.shiro.api.token.manager.AbstractTokenManager;

import java.util.UUID;

/**
 * @Auther: Alan liu
 * @Date: 2018/12/13 11:02
 * @Description: 默认token管理实现类
 */
public class DefaultTokenManagerImpl extends AbstractTokenManager {

    @Override
    public String createStringToken(String userCode) {
        //创建简易的32为uuid
        return UUID.randomUUID().toString().replace("-", "");
    }


    @Override
    public boolean checkToken(StatelessToken statelessToken) {
        return super.checkMemoryToken(statelessToken);
    }

}
